home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / PInterfaces / Graf3D.p < prev    next >
Encoding:
Text File  |  1992-01-29  |  2.2 KB  |  106 lines  |  [TEXT/MPS ]

  1.  
  2. {
  3. Created: Sunday, September 15, 1991 at 11:12 PM
  4.  Graf3D.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.   Copyright Apple Computer, Inc. 1985-1991
  8.   All rights reserved
  9. }
  10.  
  11.  
  12. {$IFC UNDEFINED UsingIncludes}
  13. {$SETC UsingIncludes := 0}
  14. {$ENDC}
  15.  
  16. {$IFC NOT UsingIncludes}
  17.  UNIT Graf3D;
  18.  INTERFACE
  19. {$ENDC}
  20.  
  21. {$IFC UNDEFINED UsingGraf3D}
  22. {$SETC UsingGraf3D := 1}
  23.  
  24. {$I+}
  25. {$SETC Graf3DIncludes := UsingIncludes}
  26. {$SETC UsingIncludes := 1}
  27. {$IFC UNDEFINED UsingQuickdraw}
  28. {$I $$Shell(PInterfaces)Quickdraw.p}
  29. {$ENDC}
  30. {$SETC UsingIncludes := Graf3DIncludes}
  31.  
  32. CONST
  33. radConst = 3754936;
  34.  
  35. TYPE
  36. XfMatrix = ARRAY [0..3,0..3] OF Fixed;
  37.  
  38. Point3D = RECORD
  39.  x: Fixed;
  40.  y: Fixed;
  41.  z: Fixed;
  42.  END;
  43.  
  44. Point2D = RECORD
  45.  x: Fixed;
  46.  y: Fixed;
  47.  END;
  48.  
  49. Port3DPtr = ^Port3D;
  50. Port3DHandle = ^Port3DPtr;
  51. Port3D = RECORD
  52.  grPort: GrafPtr;
  53.  viewRect: Rect;
  54.  xLeft: Fixed;
  55.  yTop: Fixed;
  56.  xRight: Fixed;
  57.  yBottom: Fixed;
  58.  pen: Point3D;
  59.  penPrime: Point3D;
  60.  eye: Point3D;
  61.  hSize: Fixed;
  62.  vSize: Fixed;
  63.  hCenter: Fixed;
  64.  vCenter: Fixed;
  65.  xCotan: Fixed;
  66.  yCotan: Fixed;
  67.  ident: BOOLEAN;
  68.  xForm: XfMatrix;
  69.  END;
  70.  
  71.  
  72. PROCEDURE InitGrf3d(port: Port3DHandle);
  73. PROCEDURE Open3DPort(port: Port3DPtr);
  74. PROCEDURE SetPort3D(port: Port3DPtr);
  75. PROCEDURE GetPort3D(VAR port: Port3DPtr);
  76. PROCEDURE MoveTo2D(x: Fixed;y: Fixed);
  77. PROCEDURE MoveTo3D(x: Fixed;y: Fixed;z: Fixed);
  78. PROCEDURE LineTo2D(x: Fixed;y: Fixed);
  79. PROCEDURE Move2D(dx: Fixed;dy: Fixed);
  80. PROCEDURE Move3D(dx: Fixed;dy: Fixed;dz: Fixed);
  81. PROCEDURE Line2D(dx: Fixed;dy: Fixed);
  82. PROCEDURE Line3D(dx: Fixed;dy: Fixed;dz: Fixed);
  83. PROCEDURE ViewPort(r: Rect);
  84. PROCEDURE LookAt(left: Fixed;top: Fixed;right: Fixed;bottom: Fixed);
  85. PROCEDURE ViewAngle(angle: Fixed);
  86. PROCEDURE Identity;
  87. PROCEDURE Scale(xFactor: Fixed;yFactor: Fixed;zFactor: Fixed);
  88. PROCEDURE Translate(dx: Fixed;dy: Fixed;dz: Fixed);
  89. PROCEDURE Pitch(xAngle: Fixed);
  90. PROCEDURE Yaw(yAngle: Fixed);
  91. PROCEDURE Roll(zAngle: Fixed);
  92. PROCEDURE Skew(zAngle: Fixed);
  93. PROCEDURE Transform(src: Point3D;VAR dst: Point3D);
  94. FUNCTION Clip3D(src1: Point3D;src2: Point3D;VAR dst1: Point;VAR dst2: Point): INTEGER;
  95. PROCEDURE SetPt3D(VAR pt3D: Point3D;x: Fixed;y: Fixed;z: Fixed);
  96. PROCEDURE SetPt2D(VAR pt2D: Point2D;x: Fixed;y: Fixed);
  97. PROCEDURE LineTo3D(x: Fixed;y: Fixed;z: Fixed);
  98.  
  99.  
  100. {$ENDC} { UsingGraf3D }
  101.  
  102. {$IFC NOT UsingIncludes}
  103.  END.
  104. {$ENDC}
  105.  
  106.